<!-- 好友列表 模块 -->
<template>
	<view
		class="p-2 flex align-center border-bottom border-light-secondary animate__animated animate__fadeIn"
		hover-class="bg-light">
		<!-- 头像 -->
		<image
			:src="item.avatarImg?item.avatarImg:'/static/default.jpg'"
			style="width:100rpx; height: 100rpx;"
			class="rounded-circle mr-2"
		></image>
		<!-- 昵称 - 性别 -->
		<view class="flex flex-column flex-1">
			<text class="font-md text-dark">{{ item.username }}</text>
			<!-- :type="item.sex === 1||item.sex === 0? 'pink' : 'primary'" -->
			<uni-badge
			v-if="item.sex&&item.age"
				:text="item.age"
				:type="item.sex === 1||item.sex === 0? 'pink' : 'primary'"
				style="max-width:110rpx;height:44rpx;"
			>
				<text
					v-if="item.sex > 0"
					class="iconfont text-white font-sm"
					:class="item.sex === 1 ? 'icon-nv ' : 'icon-nan'"
					style="margin-right:8rpx;"
				></text>
				<!-- 未知性别 -->
				<text
					v-else
					class="text-white"
					style="margin-right:5rpx;"
				>未知</text>
			</uni-badge>
			
			<uni-badge
			   v-else
				text="item.age"
				type='pink'
				style="max-width:110rpx;height:44rpx;"
			>
				<text
					class="text-white"
					style="margin-right:5rpx;"
				>未知</text>
			</uni-badge>
		</view>
		<!-- 是否关注 -->
		<view
			class="uni-icon uni-icon-checkbox-filled"
			:class="item.isFollow ? 'text-main' : 'text-light-muted'"
		>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			item:Object,
			index:Number
		}
	}
</script>

<style>
</style>